package com.lychee.moli.entity;

/**
 * Created by Lychee on 2018/4/11 08:55.
 * <p>
 * Author:Hejingzhou
 * <p>
 * Email:tcowork@163.com
 */
public class IdentityEntity {
    /**
     * Token 序列
     */
    private String token;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 签发者
     */
    private String issuer;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 有效时长
     */
    private Long duration;

    public IdentityEntity(String token, String userId, String issuer, String userName, Long duration) {
        this.token = token;
        this.userId = userId;
        this.issuer = issuer;
        this.userName = userName;
        this.duration = duration;
    }

    public IdentityEntity() {
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getIssuer() {
        return issuer;
    }

    public void setIssuer(String issuer) {
        this.issuer = issuer;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    @Override
    public String toString() {
        return "IdentityEntity{" +
                "token='" + token + '\'' +
                ", userId='" + userId + '\'' +
                ", issuer='" + issuer + '\'' +
                ", userName='" + userName + '\'' +
                ", duration=" + duration +
                '}';
    }
}
